This folder contains a readme and logfile for the analysis by issue area. It also includes the original survey data and codebook, and the charts and reports from the analysis. The statistical program used in this data analysis was R.

# CUSP report final Repo

This is an repo to hold replication materials for the code contained in "CUSP report final".


## Contents

This repo holds all the data and code necessary to replicate the code "CUSP code final". The repo includes:

[`readme.md`](readme.md), this readme file which provides information about the structure of the repo and steps for replication with R.

[`data/`](data), all of the data and data documentation:

 * [`Codebook.xlsx`](data/Codebook.xlsx), The codebook containing the original questions and answer codes from the original YouGov survey
 * [`PoliticalViolence_May21 Client.csv`](data/PoliticalViolence_May21 Client.csv), A csv file containing the data used in the analysis 

[`figures/`](figures), the plots produced in the analysis that are used in the paper.

[`reports/`](reports), the three reports based on the code from "CUSP report final":

 * [`Effect of ideology.pdf`](reports/Effect of ideology.pdf), The report concerning the effect of ideology on perceptions of political violence.
 * [`Effect of demographics.pdf`](reports/Effect of demographics.pdf), The report concerning the effect of demographic characteristics (gender and race) on perceptions of political violence.
 * [`Effect of political party affiliation.pdf`](reports/Effect of political party affiliation.pdf), The report concerning the effect of political party affilation on perceptions of political violence.

[`CUSP report final.Rmd`](CUSP report final.Rmd) the analysis write-up file, written in Rmarkdown. This is useful for replication, which is possibel only in R.


## Replication With R
For those familiar with R who have access to a working installation, it is possible to replicate the Rmarkdown document.
The following packages need to be installed:

* [ ] tidyverse
* [ ] ggplot2
* [ ] stats
* [ ] gmodels
* [ ] vcd
* [ ] grid
* [ ] jtools
* [ ] huxtable
* [ ] flextable
